<?php

namespace Addons\AutoComplete\Model;

use Think\Model;

/**
 * @author:温作权
 */
class AddonDataModel extends \BaseModel
{
    //protected $tableName = 'addon_data';
    /*****添加**/
    public function load($id)
    {
        $data = $this->where(array('id' => $id))->find();
        //dump($data);
        if ($data) {
            $content = (array)unserialize($data['content']);
            unset($data['content']);
            $data = array_merge($content, $data);
        }
        //dump($data['group_name']."_load");
        hook($data['group_name'] . "_load", $data);
        return $data;


    }

}
